package org.example.test1;
//单例
public class Boss {
    //声明并创建一个静态对象(私有化)
    private static Boss boss = new Boss();
    private Boss(){

    }
    //公共的静态方法,返回boss的单例对象
    public static Boss getInstance(){
        return boss;
    }
}
